<?php

namespace app\api\validate;


class ActicleValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'isPositiveInteger',
        'title' => 'require|isNotEmpty|chsDash',//标题
        'img' => 'require|isNotEmpty',//图片
        'type' => 'require|isNotEmpty|isPositiveInteger',//文章类型
        'category_content' => 'require|isNotEmpty', //文章内容
    ];

    protected $message = [
        'type.require' => "文章类型能为空",
        'type.isPositiveInteger' => "文章类型能为空",
        'title.require' => "标题不能为空",
        'title.chsDash' => "标题输入格式有误",
        'img.require' => "封面不能为空",
        'category_content.require' => "文章内容不能为空",
    ];
}
